package com.tcc.spring.interceptor;

import com.tcc.core.interceptor.AbstractTccTransactionAspect;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

/**
 * @Author: admin
 * @Description:
 * @Date: 2018/10/27 14:26
 */

@Aspect
@Component
public class TccTransactionAspectImpl extends AbstractTccTransactionAspect implements Ordered {

    @Autowired
    public TccTransactionAspectImpl(final TccTransactionInterceptorImpl tccTransactionInterceptor){
        this.setTccTransactionInterceptor(tccTransactionInterceptor);
    }

    @Override
    public int getOrder() {
        return Ordered.HIGHEST_PRECEDENCE;
    }
}
